package com.lizemin.beanpostprocessor.service;

import com.lizemin.beanpostprocessor.entity.User;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Service;

/**
 * @author lzm
 * @date 2025/7/4 20:20
 * @description
 */
@Slf4j
@Service
public class BeanService implements InitializingBean {

    @Override
    public void afterPropertiesSet() throws Exception {
        log.info("开始初始化{}类的实例对象", this.getClass().getName());
    }

    public User getUser(Integer id) {
        User user = new User();
        user.setId(id);
        user.setName("csdn");
        user.setAge(28);
        return user;
    }
}
